<template>
	<div class="front" v-drag>
		<div class="tree-left bg-white">
        <div class="tit">辅助资料明细</div>
        <div class="tree bj">
			<el-scrollbar style="height: 100%;">
				<v-tree/>
			</el-scrollbar>
		</div>
        </div>
        <div class="tree-right bg-white">
			<v-menu/>
			<div class="table">
				<el-scrollbar style="height: 100%">
					<!-- 小类表格 -->
					<sub-class-table v-if="row[0]['level'] === 0"/>
					<!-- 小类明细表格 -->
					<details-table v-if="row[0]['level'] === 1"></details-table>
				</el-scrollbar>
			</div>
		</div>
	</div>
</template>
<script>
import tree from './tree'
import menu from './menu'
import subClassTable from './subClassTable'
import detailsTable from './detailsTable'
export default {
	components: {
		'v-tree': tree,
		'v-menu': menu,
		'sub-class-table': subClassTable,
		'details-table': detailsTable
	},
	data() {
		return {
			row: this.$store.state.auxiliaryStore.row,
			options: this.$store.state.options
		}
	},
	created() {
		this.$store.commit('auxiliaryStore/updateExpandNodeId');
		this.$store.dispatch('auxiliaryStore/getTreeData');
	}
}
</script>